#!/usr/bin/python

import sys, getopt

def main(argv):	
	try:
		opts, args = getopt.getopt(argv,"hl",["list", "Arabic", "Bulgarian", "Chinese-simplified", "Chinese-traditional", "Dutch", "English-us", "English-british", "French", "German", "Greek", "Hebrew", "Hungarian", "Italian", "Japanese", "Korean", "Polish", "Portuguese-brazil", "Portuguese-portugal", "Russian", "Spanish-argentina", "Spanish-spain", "Swedish", "Turkish", "Ukrainian", "Just-install" ])
	except getopt.GetoptError:
		print 'Usage:\npython firefox-updater.py <language>\nExamples:\n\npython firefox-updater.py --Arabic\npython firefox-updater.py --German\npython firefox-updater.py --English-us'
		sys.exit(2)
	for opt, arg in opts:		
		if opt == "-h":
			print 'Script made by Caelus, to download and install Firefox 4 in BackTrack\nUsage:\n-h			Shows this menu\n-l or --list			Shows the list of the supported languages\n'
			sys.exit(0)	
		elif opt in ("-l", "--list"):
			print '\nArabic			Bulgarian		Chinese-simplified			Chinese-traditional\nDutch			English-us		English-british				French \nGerman 			Greek 			Hebrew 					Hungarian \nItalian			Japanese		Korean					Polish \nPortuguese-brazil	Portuguese-portugal	Russian					Spanish-argentina\nSpanish-spain		Swedish 		Turkish					Ukrainian\n\nTotal languages available to download at the moment: 24\n'
		elif opt in ("--German"):
			import subprocess
			import os
			import shutil
			subprocess.call("wget http://mozilla.cdn.leaseweb.com/firefox/releases/4.0/linux-i686/de/firefox-4.0.tar.bz2", shell=True)
			print '\n Download concluded, moving & decompressing files now...\n'			
			shutil.move("firefox-4.0.tar.bz2", "/usr/local/bin")			
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing file now...\n'			
			subprocess.call("tar jxvf firefox-4.0.tar.bz2", shell=True)
			print '\nFile completely uncompressed, killing processes...\n'
			subprocess.call("killall firefox", shell=True)
			subprocess.call("killall firefox-bin", shell=True)
			subprocess.call('kmenuedit', shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)	
		elif opt in ("--English-us"):
			import subprocess
			import shutil
			import os
			subprocess.call('wget http://mozilla.ftp.halifax.rwth-aachen.de/mozilla/firefox/releases/4.0/linux-i686/en-US/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving files and changing directory...\n'			
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')			
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing file now...\n'			
			subprocess.call('tar jxvf /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			print '\nFile completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			subprocess.call('kmenuedit', shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ("--Arabic"):
			import subprocess
			import shutil
			import os
			subprocess.call('wget http://mirror2.hs-esslingen.de/ftp.mozilla.org/firefox/releases/4.0/linux-i686/af/firefox-4.0.tar.bz2', shell=True)	
			print '\nDownload completed, moving files and changing directory...\n'			
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing file now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print '\nFile completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			subprocess.call('kmenuedit',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Bulgarian'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://mozilla.c3sl.ufpr.br/releases//firefox/releases/4.0/linux-i686/bg/firefox-4.0.tar.bz2',shell=True)
			print '\nDownload completed, moving files and changing directory...\n'			
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing file now...\n'			
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print '\nFile completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			subprocess.call('kmenuedit',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Just-install'):
			import shutil
			import os
			import subprocess
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')			
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print '\nFile completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			subprocess.call('kmenuedit',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Chinese-simplified'):
			import subprocess
			import shutil
			import os
			subprocess.call	('wget http://mozilla.ftp.halifax.rwth-aachen.de/mozilla/firefox/releases/4.0/linux-i686/zh-CN/firefox-4.0.tar.bz2',shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Chinese-traditional'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://3347-mozilla.voxcdn.com/pub/mozilla.org/firefox/releases/4.0/linux-i686/zh-TW/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Dutch'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://mozilla.snt.utwente.nl//firefox/releases/4.0/linux-i686/nl/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--English-british'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://mozilla.cdn.leaseweb.com/firefox/releases/4.0/linux-i686/en-GB/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--French'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://mirrors.isu.net.sa/pub/mozilla.org//firefox/releases/4.0/linux-i686/fr/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Greek'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://mirror.karneval.cz/pub/mozilla/firefox/releases/4.0/linux-i686/el/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Hebrew'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://mozilla.ftp.halifax.rwth-aachen.de/mozilla/firefox/releases/4.0/linux-i686/he/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Hungarian'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://mozilla.c3sl.ufpr.br/releases//firefox/releases/4.0/linux-i686/hu/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Italian'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://ftp.jaist.ac.jp/pub/mozilla.org/firefox/releases/4.0/linux-i686/it/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)	
		elif opt in ('--Japanese'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://mozilla.ftp.halifax.rwth-aachen.de/mozilla/firefox/releases/4.0/linux-i686/ja/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Korean'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://3347-mozilla.voxcdn.com/pub/mozilla.org/firefox/releases/4.0/linux-i686/ko/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Polish'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://jp-nii01.mozilla.org/pub/mozilla.org/firefox/releases/4.0/linux-i686/pl/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Portuguese-brazil'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://mirror.clarkson.edu/mozilla/firefox/releases/4.0/linux-i686/pt-BR/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Portuguese-portugal'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://ftp.pwr.wroc.pl/pub/mozilla/firefox/releases/4.0/linux-i686/pt-PT/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Russian'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://www.mirrorservice.org/sites/releases.mozilla.org/pub/mozilla.org//firefox/releases/4.0/linux-i686/ru/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Spanish-argentina'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://kyoto-mz-dl.sinet.ad.jp/pub/mozilla.org//firefox/releases/4.0/linux-i686/es-AR/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Spanish-spain'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://3347-mozilla.voxcdn.com/pub/mozilla.org/firefox/releases/4.0/linux-i686/es-ES/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Swedish'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://www.mirrorservice.org/sites/releases.mozilla.org/pub/mozilla.org//firefox/releases/4.0/linux-i686/sv-SE/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Turkish'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://mozilla.c3sl.ufpr.br/releases//firefox/releases/4.0/linux-i686/tr/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
		elif opt in ('--Ukrainian'):
			import subprocess
			import os
			import shutil
			subprocess.call('wget http://mozilla.cdn.leaseweb.com/firefox/releases/4.0/linux-i686/uk/firefox-4.0.tar.bz2', shell=True)
			print '\nDownload completed, moving file and changing directory...\n'
			shutil.move('firefox-4.0.tar.bz2', '/usr/local/bin')
			os.chdir ('/usr/local/bin')
			print '\nFile moved, uncompressing files now...\n'
			subprocess.call('tar jxvf firefox-4.0.tar.bz2',shell=True)
			print 'File completely uncompressed, killing processes...\n'
			subprocess.call('killall firefox',shell=True)
			subprocess.call('killall firefox-bin',shell=True)
			print '\nNow enter the Internet Menu in KMenuEdit, choose Web Browser\n\nOn command option add: /usr/local/bin/firefox/firefox\n'
			subprocess.call('kmenuedit',shell=True)
			subprocess.call('rm /usr/local/bin/firefox-4.0.tar.bz2',shell=True)
			sys.exit(0)
if __name__ == "__main__":
   main(sys.argv[1:])			